{% include header.html %}

      <div class="clearfix">
      
        <div class="license-body">
        
            {% if page.nickname %}
            <p class="license-nickname">
                {{ page.nickname }}
            </p>
            {% endif %}

            <p>
                {{ page.description }}
            </p>
            
            <div class="license-page-details">
            
              <table class="license-rules">
                <tr>
                {% assign types = "permissions|conditions|limitations" | split: "|" %}
                {% for type in types %}
                  {% if type == 'permissions' %}
                    <th class="label">允许</th>
                  {% elsif type == 'conditions' %}
                    <th class="label">要求</th>
                  {% elsif type == 'limitations' %}
                    <th class="label">禁止</th>
                  {% else %}
                    <th class="label">{{ type | capitalize }}</th>
                  {% endif %}
                {% endfor %}
                </tr>
                <tr>
                  {% for type in types %}
                    <td>
                      <ul class="license-{{ type }}">
                        {% assign rules = site.data.rules[type] | sort: "label" %}
                        {% for rule_obj in rules %}
                          {% assign req = rule_obj.tag %}
                          {% if page[type] contains req %}
                            <li class="{{ req }}">
                              <span class="license-sprite"></span>
                              {% if rule_obj.label == 'Commercial Use' %}
                                商业用途
                              {% elsif rule_obj.label == 'Distribution' %}
                                分发
                              {% elsif rule_obj.label == 'Modification' %}
                                修改
                              {% elsif rule_obj.label == 'Patent Use' %}
                                专利授权
                              {% elsif rule_obj.label == 'Private Use' %}
                                私用
                              {% elsif rule_obj.label == 'Disclose Source' %}
                                公开源码
                              {% elsif rule_obj.label == 'License and Copyright Notice' %}
                                放置许可协议与版权信息
                              {% elsif rule_obj.label == 'Network Use is Distribution' %}
                                使用网络分发
                              {% elsif rule_obj.label == 'Same License' %}
                                使用相同协议
                              {% elsif rule_obj.label == 'State Changes' %}
                                声明变更
                              {% elsif rule_obj.label == 'Hold Liable' %}
                                承担责任
                              {% elsif rule_obj.label == 'Trademark Use' %}
                                使用商标
                              {% else %}
                                {{ rule_obj.label }}
                              {% endif %}
                            </li>
                          {% endif %}
                        {% endfor %}
                      </ul>
                    </td>
                  {% endfor %}
                </tr>
              </table>
              
            </div>

            <pre id="license-text">{{ content | replace:"<", "&lt;" | replace:">", "&gt;" }}</pre>
          
        </div> <!-- /license-body -->

{% include sidebar.html %}

      </div> <!-- /clearfix -->

{% include footer.html %}
